package com.demo.service.impl;


import com.demo.mapper.UserMapper;
import com.demo.pojo.Result;
import com.demo.pojo.User;
import com.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public User getUser(Integer id) {
        return this.userMapper.getUserById(id);
    }

    @Override
    public List<User> getAll() {
        return this.userMapper.getAll();
    }

    @Override
    public Integer deleteUser(Integer id) {
        return this.userMapper.deleteUser(id);
    }
}
